package com.kd.mining.lda.config;

import java.util.Properties;

import com.kd.utils.PropertiesUtils;
import com.kd.utils.StringUtils;

public class LDAConfig {

	private static String originalDocDir = null;
	private static String resultDocDir = null;
	private static String LDAParamFileName = null;
	
	static {
		Properties pro = PropertiesUtils.getProperties("lda_config.properties");
		originalDocDir = pro.getProperty("originalDoc.dir");
		resultDocDir = pro.getProperty("resultDoc.dir");
		LDAParamFileName = pro.getProperty("lda.parameter.fileName");
		if(StringUtils.isBlank(originalDocDir)) {
			throw new RuntimeException("The original document directory can not null");
		}
		if(StringUtils.isBlank(resultDocDir)) {
			throw new RuntimeException("The result document directory can not null");
		}
		if(StringUtils.isBlank(LDAParamFileName)) {
			throw new RuntimeException("The LDA Parameter file name can not null");
		}
	}
	
	public static String getOriginalDocDir() {
		return originalDocDir;
	}
	public static void setOriginalDocDir(String originalDocDir) {
		LDAConfig.originalDocDir = originalDocDir;
	}
	public static String getResultDocDir() {
		return resultDocDir;
	}
	public static void setResultDocDir(String resultDocDir) {
		LDAConfig.resultDocDir = resultDocDir;
	}
	public static String getLDAParamFileName() {
		return LDAParamFileName;
	}
	public static void setLDAParamFileName(String lDAParamFileName) {
		LDAParamFileName = lDAParamFileName;
	}
	
}
